<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <!--移动端的预览设置，用于适配移动端-->
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <link rel="stylesheet" href="/Semantic-UI-CSS-master/semantic.min.css">
    <link rel="stylesheet" href="/css/myblog.css">
    <link rel="icon" href="/images/闪电.ico" sizes="32x32">
    <title>后台管理</title>
    <script>
        var _hmt = _hmt || [];
        (function() {
            var hm = document.createElement("script");
            hm.src = "https://hm.baidu.com/hm.js?7cd3e5b5274253178c805c4447a51941";
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(hm, s);
        })();
    </script>
</head>
<script type="text/javascript">document.write(unescape("%3Cspan id='cnzz_stat_icon_1279472717'%3E%3C/span%3E%3Cscript src='https://v1.cnzz.com/z_stat.php%3Fid%3D1279472717%26show%3Dpic1' type='text/javascript'%3E%3C/script%3E"));</script>
<body>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<div class="ui middle aligned center aligned grid m-container-small m-padded-tb-big">
    <div class="column">
        <h2 class="ui teal image header">
            <div class="content header">
                个人博客登录
            </div>
        </h2>
        <h3 class="ui red header" th:text="${tip}"></h3>
        <form class="ui large form" method="post" action="/user/login">
            <div class="ui stacked segment">
                <div class="field">
                    <div class="ui left icon input">
                        <i class="user icon"></i>
                        <input type="text" name="name" placeholder="账号">
                    </div>
                </div>
                <div class="field">
                    <div class="ui left icon input">
                        <i class="lock icon"></i>
                        <input type="password" name="password" placeholder="密码">
                    </div>
                </div>
                <button class="ui fluid large teal submit button" type="submit">登录</button>
            </div>
            <div class="ui error message"></div>
        </form>
    </div>


</div>

<div class="ui middle aligned center aligned grid m-container-small m-padded-tb-big">
<div class="column">
    <h2 class="ui teal image header">
        <div class="content header">
            个人博客注册
        </div>
    </h2>
    <h3 class="ui red header" th:text="${tip}"></h3>
    <form class="ui large form" method="post" action="/user/register">
        <div class="ui stacked segment">
            <div class="field">
                <div class="ui left icon input">
                    <i class="user icon"></i>
                    <input type="text" name="name" placeholder="账号">
                </div>
            </div>
            <div class="field">
                <div class="ui left icon input">
                    <i class="lock icon"></i>
                    <input type="password" name="password" placeholder="密码">
                </div>
            </div>
            <button class="ui fluid large teal submit button" type="submit">注册</button>
        </div>
        <div class="ui error message"></div>
    </form>
</div>
</div>

<!---->
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
  <!--底部footer-->
  <div th:replace="~{index::footer}"></div>

    <script src="/js/jquery-3.5.1.min.js"></script>
    <script src="/Semantic-UI-CSS-master/semantic.min.js"></script>
    <script  type="text/javascript">

        $("#b1").click(function (){
            $(".m-item").toggleClass("m-mobile-hide");
        });

        $('.ui.dropdown').dropdown({
            on: 'hover'
        })

        var currentPage=1;
        var size=6;
        var begin=0;

        function initialization() {
            begin=0;
            loadData();
        }
        function next() {
            currentPage++;
            begin+=size;
            loadData();
        }
        function pre() {
            if (begin>0){
                begin-=size;
                loadData();
            }
        }
        function loadData(){
            $.ajax({
                url:"/blogCombination_blogs",
                data:{"begin":begin,"size":size,title:$("[name='title']").val(),type: $("[name='type']").val(),},
                type:"get",
                success:function (result) {
                    $("#table-container").html(result);
                }
            })
        }
        function deleteBlog(button) {
            $.ajax({
                url: "/blog",
                data:{"id":$(button).attr("data-id")},
                type:"delete",
                success:function(result){
                    $("#table-container").html(result);
                }
            })
        }
    </script>
<!--<script src="https://myhkw.cn/player/js/player.js" id="myhk" key="160861313283" m="1"></script>-->
</body>
</html>